import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import login from "@/views/login.vue";
import register from "@/views/register.vue";
import index from "@/views/index.vue";
import robot from "@/views/robot";
import BooksList from "../views/BooksList";
import BookDetails from "../views/BookDetails";
import Order from "@/views/Order";
import Cart from "@/views/Cart";


Vue.use(VueRouter)

const routes = [
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path: '/robot',
    name: 'robot',
    component: robot
  },
  {
    path:'/cart',
    name:'Cart',
    component:Cart
  },
  {
    path:'/order',
    name:'Order',
    component:Order
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path:'/bookDetails',
    name:'BookDetails',
    component:BookDetails
  },
  {
    path:'/booksList/:category',
    name:'BooksList',
    component:BooksList
  }
]

const router = new VueRouter({
  routes,
  mode:"history"
})

export default router
